The code for running each treatment is given in the relevant ZTT file which ran through zTree with 12 zLeaves connected

Original data files for each session were first converted from wide to long format, then amalgamated into one file ("All_data_lab_games")

Welfare implications of individual decisions were calculated as per the equations in the main paper. Decisions of others in the group in a given round were aggregated ("181219_All_data_lab_games_stata")

This file was then aggregated to the group level ("181219 group level outcomes of interest") and session level ("250217 session level welfare")

The file "190528 Summary statistics for R" condenses outcomes to the treatment level in order to be plotted.

The R file "250527 JAERE replication figs" contains the code to produce the two figures. It uses R version 2024.12.1+563. It requires the librarie "ggplot2" and "plyr"

The R file "250527 JAERE replication inefficiency tables" contains the code to produce tables 5 and A5-A7. It uses R version 2024.12.1+563. It requires the library "dplyr"

The stata file "250527 JAERE stata replication code" contains all the needed code to generate all other results tables. It runs in Stata 18 using bse libraries and "estout" (loaded in line 2). 

Below lists by each of the three code files places directories need to be updated, and where specific tables/figures are generated.

R file "250527 JAERE replication inefficiency tables"
Directory to be updated in line 11.
Figure 2 - bonus bar chart - is generated through each subfigure lines 50-127
Figure A2 - fine bar chart 

R file "250527 JAERE replication inefficiency tables"
Directory to be updated in line 6.
The whole code is required to generate Tables 5 and A5-A7. Table 5 and A6 are generated by line 58 (group_means_ineff_25) and A5 & A7 by line 69 (group_means_ineff_90).


Stata file "250527 JAERE stata replication code"
Update directories at lines: 7, 13, 19, 25, 34, 48, 54,81, 90, 129, 174, 401, 414, 457, 530

Table 4 - ind_first_bonus - lines 128-168
Table 6 - welfare_v_pigou - lines 53-85
Table A2 - ind_first_fine - lines 191-316
Table A3 - learning_regression_bonus - lines 567-631
Table A4 - learning_regression_fine - lines 636-700
Table A8 - fine_impact - lines 318-383
Table A9 - comprehension - lines 426-435
Table A10 - tremble_hand - lines 438-447
Table A11 - ind_first_robust_comprehension - lines 456-498
Table A12 - ind_first_robust_trembles - lines 501-521